<?php
//声明文件解析的编码格式
header('content-type:text/html;charset=utf-8');

function dbcon()
{

		$servername = "127.0.0.1";
		$username = "root";
		$password = "";

		// 创建连接
		$conn = new mysqli($servername, $username, $password);

		// 检测连接
		if ($conn->connect_error) {
		    die("连接失败: " . $conn->connect_error);
		} 		

		$conn->query('set names utf8');
        $conn->query('use sente');

        return $conn;


}